<%@page import="lib_model.Product.Image_products"%>
<%@page import="java.util.ArrayList"%>
<%@page import="lib_model.Product.Products"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="UTF-8"%>
<jsp:include page="../templates/Header.jsp"></jsp:include>
Product New
<jsp:include page="../templates/Title.jsp"></jsp:include>
<jsp:include page="../templates/Style.jsp"></jsp:include>
<div class="body-center w960">
<%
	if (request.getParameter("id") != null) {
%>
<h2 class="title-show">Shop New (20) Category</h2>
<%
	String idCategories = request.getParameter("id").toString();
		Products p = new Products();
		ArrayList<Products> ps = (ArrayList<Products>) p.SelectToNew().ObjResult;
		for (Products product : ps) {
%>

<div class="product-show"
	style="padding: 3px; border: 2px solid; font-size: 12px"><b>Name</b>:
<font color="white"><%=product.name%></font><br>
<b>Price</b> : <font color="white"><%=product.price%></font> $<br>
<br>
<%
	Image_products img = new Image_products();
			ArrayList<Image_products> imgs = (ArrayList<Image_products>) img
					.Select(product.id).ObjResult;
			for (Image_products img2 : imgs) {
%> <a href="../pages/product-detail.jsp?id=<%=product.id%>"><img
	style="border: 1px solid;" src="../uploads/<%=img2.image_url%>"
	alt="Product Image.." height="175" width="175" /></a> <%
 	break;
 			}
 %> <input type="button" value="Views Detail" class="border"
	idPro="<%=product.id%>" />
<hr />
</div>
<%
	}
	} else {
%><h2>This Categories is empty</h2>
<%
	}
%>
</div>
<jsp:include page="../templates/Footer.jsp"></jsp:include>